<template>
  <div class="my-space">
    <div class="flex flex-direction-column align-items-center">
      <VanField label="MySpace" v-model="val" />

      <VanButton type="primary" @click="pushMySpace">push MySpace</VanButton>

      <VanButton @click="pushHome">push Home</VanButton>
    </div>
  </div>
</template>

<style lang="scss" scoped>
// .my-space {}
</style>

<script lang="ts">
export default {
  name: "MySpace",
};
</script>

<script setup lang="ts">
import { ref } from "vue";
import { useRouter } from "vue-router";
const router = useRouter();

const val = ref("");

function pushMySpace() {
  router.push({ name: "MySpace" });
}

function pushHome() {
  router.push({ name: `Home` });
}
</script>
